Conversation
|
|
||
| ### Debug Mode | ||
|
|
||
| If you want to debug a graph with a python debugger you can use [](#tierkreis.controller.storgare.debug_graph.debug_graph). |
There was a problem hiding this comment.
Do you need something in this [] part of the link?
| inputs_ready: list[NodeRunData] | ||
| started: list[Loc] | ||
| errored: list[Loc] = Field(default_factory=list[Loc]) | ||
| breaks: Loc | None = None |
There was a problem hiding this comment.
Is it significant that breaks is a single Loc rather than a list of them?
| and therefore can be started. | ||
| started (list[Loc]): A list of locations that have been started (on this walk). | ||
| errored (list[Loc]): A list of locations that have encountered an error. | ||
| """ |
There was a problem hiding this comment.
breaks might need to be added to the docstring?
| self, | ||
| inputs_type: type[Inputs] = EmptyModel, | ||
| outputs_type: type[Outputs] = EmptyModel, | ||
| breakpoints_on_inputs: bool = False, |
There was a problem hiding this comment.
I wonder if these would be better as setters and getters, the reason being that they would be easier to comment out in code if the user wants to turn them on/off
There was a problem hiding this comment.
I agree but this would only work for ouptuts as inputs are set in the init.
Once we use the "compile" way we could change this
| if not storage.is_node_started(loc): | ||
| # have all inputs, start current node | ||
| return WalkResult([node_run_data], []) | ||
| if idx in graph.node_metadata and graph.node_metadata[idx].has_breakpoint: |
There was a problem hiding this comment.
Traversing backwards from the outputs means that we will hit breakpoints before nodes that have run, which I don't think is quite what we want.
There was a problem hiding this comment.
I double checked the logic is actually correct, the test also covers this case now.
Run once with:
then after